package longcaisuyun.longcai.com.net;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;
import com.zcx.helper.util.UtilMD5;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2016/4/19.
 */
@HttpInlet(Net.ADDCARD)
public class PostAddCard extends WHAsyPost<PostAddCard.Info> {

    public String driverid;
    public String name;
    public String bankcard;
    public String banktype;
    public String mobile;
    public String paypwd;

    /*** @param driverid
     * @param name
     * @param bankcard
     * @param banktype
     * @param mobile
     * @param paypwd
     * @param asyCallBack
     */
    public PostAddCard(String driverid, String name, String bankcard, String banktype, String mobile, String paypwd, AsyCallBack asyCallBack) {
        super(asyCallBack);
        this.driverid=driverid;
        this.name=name;
        this.bankcard=bankcard;
        this.banktype=banktype;
        this.mobile=mobile;
        this.paypwd= UtilMD5.MD5EncodeCount(paypwd,"",2);
    }



    @Override
    protected Info parser(JSONObject object) {
        Info   info=new Info();
        try {
            info.message=object.getString("message");
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return info;
    }

    public static class Info {
        public String message;
    }
}
